<template>
  <div id="app">
    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'App',
  errorCaptured(err, vm, info) {
    // 捕获并处理路由导航错误
    if (err.name === 'NavigationDuplicated' || err.message.includes('Navigation cancelled')) {
      // 忽略导航重复和取消错误
      console.warn('路由导航被取消或重复:', err)
      return false
    }
    // 其他错误继续传播
    return true
  }
}
</script>

<style lang="scss">
@import '@/styles/global.scss';

#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  height: 100vh;
  overflow: hidden;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

// Element UI 样式覆盖
.el-message {
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.el-notification {
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

// 按钮圆角
.el-button {
  border-radius: 4px !important;
}

// 卡片圆角
.el-card {
  border-radius: 8px !important;
}

// 对话框圆角
.el-dialog {
  border-radius: 8px !important;
}

// 表格圆角
.el-table {
  border-radius: 8px !important;
  overflow: hidden;
}
</style>